<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>闰年判断</title>
    <style  type="text/css">
        .scanf{
            margin:center;
            width:50px;
            height:100px;

        }
        .printf{
            margin:center;
            width:50px;
            height:100px;

        }
        </style>
</head>
<body>
<form  action= "ruinian.php" >

<?php
$year=$_POST['year'];
if(($year%4==0)&&($year%100!=0)||($year%400==0)){
$result=$year.'年是闰年';
}
else{
$result=$year.'不是闰年';
}
echo '<p>输入的年份：<input type="text" value="$year"  name="year" id="scanf">';
echo '<p>判断的结果：'.$year.'年'.$result;
echo '<input type="submit">;
/**
 * User: qq6789
 * Date: 2016/9/27
 * Time: 9:26
 */
</form>
</body>
</html>

